//Source file: D:\\aaa\\com\\ce\\pms\\renovation\\model\\RenovateApprovalDO.java

package com.ce.pms.renovation.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

/**
 * 装修审批
 *
 * @author yandawei
 * @CreateDate:2008-12-17
 */
@Entity
@DiscriminatorValue("001")
public class RenovateApprovalDO extends AbstractApprovalDO {

	/**
	 *
	 */
	private static final long serialVersionUID = -8126984164014136725L;

	/**
	 * 审批等级 001-一级审批，002-二级审批
	 */
	@Column(name = "LEVEL", length = 3)
	private String level;

	/**
	 * 审批项目
	 */
	@OneToMany(mappedBy = "approval")
	private Set<ApprovalItemDO> approvalItems = new HashSet<ApprovalItemDO>();

	/**
	 * 装修申请DO
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RENOVATE_REQUISITION_ID")
	private RenovateRequisitionDO renovateRequistion;

	/**
	 * 无参构造子
	 *
	 * @roseuid 493CECB0000F
	 */
	public RenovateApprovalDO() {

	}

	public RenovateApprovalDO(Long keyword) {
		super(keyword);
	}

	/**
	 * 添加评审项目
	 *
	 * @param approvalItemDO
	 * @roseuid 493CEF210109
	 */
	public void addApprovalItem(ApprovalItemDO approvalItemDO) {
		this.getApprovalItems().add(approvalItemDO);
	}

	public Set<ApprovalItemDO> getApprovalItems() {
		return approvalItems;
	}

	public void setApprovalItems(Set<ApprovalItemDO> approvalItems) {
		this.approvalItems = approvalItems;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public RenovateRequisitionDO getRenovateRequistion() {
		return renovateRequistion;
	}

	public void setRenovateRequistion(RenovateRequisitionDO renovateRequistion) {
		this.renovateRequistion = renovateRequistion;
	}

}
